using System;
using System.ComponentModel.DataAnnotations;
using MESBaseis.Domain.BaseEntities;

namespace MESBaseis.Domain.XZY
{
    /// <summary>
    /// 统计数据实体
    /// </summary>
    public class StatisticsModel : BaseModel
    {
        /// <summary>
        /// 统计日期
        /// </summary>
        [Required]
        public DateTime Date { get; set; }

        /// <summary>
        /// 统计类型 (sales/purchase)
        /// </summary>
        [Required]
        [StringLength(50)]
        public string Type { get; set; } = string.Empty;

        /// <summary>
        /// 订单金额
        /// </summary>
        [Required]
        public decimal OrderAmount { get; set; }

        /// <summary>
        /// 订单数量
        /// </summary>
        [Required]
        public int OrderCount { get; set; }

        /// <summary>
        /// 时间范围 (week/month/year)
        /// </summary>
        [StringLength(20)]
        public string? TimeRange { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string? Remarks { get; set; }
    }
}